cmake_minimum_required(VERSION 3.10)
project(v4l2_app_master C)

set(CMAKE_C_STANDARD 11)

include_directories(/usr/include/x86_64-linux-gnu /usr/local/include/ /usr/include/libdrm)
link_directories(/usr/lib/x86_64-linux-gnu)

include_directories(common)

set(common_SRC
        common/util_drm.c
        common/util_v4l2.c
        common/render_window.c
        )

set(LIBS drm SDL pthread)

add_executable(capture2file
        capture2file/main.c
        ${common_SRC})

target_link_libraries(capture2file ${LIBS})


add_executable(query_v4l2
        query_v4l2/main.c
        ${common_SRC}
)

target_link_libraries(query_v4l2 ${LIBS})
